package 蓝桥真题;

import java.util.Scanner;

public class 砝码称重_2 {
       static Scanner sc=new Scanner(System.in);
       static int n;
       public static void main(String[] args) {
		      n=sc.nextInt();
		      int cnt=0;
		      while(n>0){
		    	  n-=Math.pow(3, cnt++);
		      }
		      System.out.print(cnt);
	   }
}